**Figures 1&2: See ReplicationSteinwand&Reinsberg.R

** Figure 3: Estimation in Stata, quantities of interest generated in R
clear
* cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use "Models_SecAloc_1-2.dta"
qui dirifit f_sec_share_bilat_11 -f_sec_share_bilat_74  ,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_bilat_11 m3_sec_share_WB_f_11) alpha2(sec_share_bilat_12 m3_sec_share_WB_f_12) alpha3(sec_share_bilat_13 m3_sec_share_WB_f_13) alpha4(sec_share_bilat_14 m3_sec_share_WB_f_14) alpha5(sec_share_bilat_15 m3_sec_share_WB_f_15) alpha6(sec_share_bilat_16 m3_sec_share_WB_f_16) alpha7(sec_share_bilat_21 m3_sec_share_WB_f_21 ) alpha8(sec_share_bilat_22 m3_sec_share_WB_f_22) alpha9(sec_share_bilat_23 m3_sec_share_WB_f_23) alpha10(sec_share_bilat_24 m3_sec_share_WB_f_24) alpha11(sec_share_bilat_25 m3_sec_share_WB_f_25) alpha12(sec_share_bilat_31 m3_sec_share_WB_f_31) alpha13(sec_share_bilat_32 m3_sec_share_WB_f_32) alpha14(sec_share_bilat_33 m3_sec_share_WB_f_33) alpha15(sec_share_bilat_41 m3_sec_share_WB_f_41) alpha16(sec_share_bilat_42 m3_sec_share_WB_f_42 ) alpha17(sec_share_bilat_43 m3_sec_share_WB_f_43) alpha18(sec_share_bilat_51 m3_sec_share_WB_f_51) alpha19(sec_share_bilat_52 m3_sec_share_WB_f_52) alpha20(sec_share_bilat_53 m3_sec_share_WB_f_53) alpha21(sec_share_bilat_70 m3_sec_share_WB_f_70) alpha22(sec_share_bilat_72 m3_sec_share_WB_f_72) alpha23(sec_share_bilat_73 m3_sec_share_WB_f_73) alpha24(sec_share_bilat_74 m3_sec_share_WB_f_74) robust cluster(r_ccode) 

* save coefficient estimates & variance-covariance matrix as matrices
matrix b=e(b)
matrix V=e(V)

* turn them into variables
svmat b, names(b)
svmat V, names(VarCov)

* get rid of other variables, empty observations
keep b* VarCov*
drop bd_WDI
duplicates drop
drop in 169

*save for further analysis in R
save "ProbOutMA2_bilat_alt.dta", replace
clear
use "Models_SecAloc_3-4.dta"
qui dirifit f_sec_share_WB_11 - f_sec_share_WB_74  ,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_WB_11 m3_sec_share_bilat_f_11) alpha2(sec_share_WB_12 m3_sec_share_bilat_f_12) alpha3(sec_share_WB_13 m3_sec_share_bilat_f_13) alpha4(sec_share_WB_14 m3_sec_share_bilat_f_14) alpha5(sec_share_WB_15 m3_sec_share_bilat_f_15) alpha6(sec_share_WB_16 m3_sec_share_bilat_f_16) alpha7(sec_share_WB_21 m3_sec_share_bilat_f_21 ) alpha8(sec_share_WB_22 m3_sec_share_bilat_f_22) alpha9(sec_share_WB_23 m3_sec_share_bilat_f_23) alpha10(sec_share_WB_24 m3_sec_share_bilat_f_24) alpha11(sec_share_WB_25 m3_sec_share_bilat_f_25) alpha12(sec_share_WB_31 m3_sec_share_bilat_f_31) alpha13(sec_share_WB_32 m3_sec_share_bilat_f_32) alpha14(sec_share_WB_33 m3_sec_share_bilat_f_33) alpha15(sec_share_WB_41 m3_sec_share_bilat_f_41) alpha16(sec_share_WB_42 m3_sec_share_bilat_f_42 ) alpha17(sec_share_WB_43 m3_sec_share_bilat_f_43) alpha18(sec_share_WB_51 m3_sec_share_bilat_f_51) alpha19(sec_share_WB_52 m3_sec_share_bilat_f_52) alpha20(sec_share_WB_53 m3_sec_share_bilat_f_53) alpha21(sec_share_WB_70 m3_sec_share_bilat_f_70) alpha22(sec_share_WB_72 m3_sec_share_bilat_f_72) alpha23(sec_share_WB_73 m3_sec_share_bilat_f_73) alpha24(sec_share_WB_74 m3_sec_share_bilat_f_74) robust cluster(r_ccode)  

* save coefficient estimates & variance-covariance matrix as matrices
matrix b=e(b)
matrix V=e(V)

* turn them into variables
svmat b, names(b)
svmat V, names(VarCov)

* get rid of other variables, empty observations
keep b* VarCov*
drop bd_WDI
duplicates drop
drop in 169

*save for further analysis in R
save "ProbOutMA2_WB.dta", replace
****************

***Figures 4&5: See ReplicationSteinwand&Reinsberg.R

*** Figure 6: Estimation in Stata, quantities of interest generated in R
clear
*cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use"Models_ProjCount.dta"
nbreg project_count_bilat_f tp_l3 tp_l2 tp_l1 tp_l0 tp_f* treated committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum*  pcd_dum* if noWB9==1 | treated==1
	*mark observations included in analysis
drop ddifmod
gen ddifmod=e(sample) 
save, replace

* save coefficient estimates & variance-covariance matrix as matrices
matrix b=e(b)
matrix V=e(V)

* turn them into variables
svmat b, names(b)
svmat V, names(VarCov)

* get rid of other variables, empty observations
keep b* VarCov*
duplicates drop
drop in 56
drop bd_WDI

*save for further analysis in R
save "ProjCtDDif_out.dta", replace


*** Table 1
clear
* cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use"Models_ProjCount.dta"

*Model 1
eststo: nbreg project_count_bilat_f noWB9 if WB9comp==1 | noWB9==1
*Model 2
eststo: nbreg project_count_bilat_f noWB9 committed_bilat_sec_yr committed_WB_sec_yr   if WB9comp==1 | noWB9==1
*Model 3
eststo: nbreg project_count_bilat_f i.noWB9 committed_bilat_sec_yr committed_WB_sec_yr  ln_pop  gdppc yr_dum*  pcd_dum*  if WB9comp==1 | noWB9==1
*generate raw table
esttab using CrossSectionProjCount.tex, label   se  title(Negative Binomial Regression: Number of Bilateral Projects\label{Res:NBreg}) replace
eststo clear
***************


*** Table 2
* cd "LOCATION OF FILES"
clear
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use"Models_ProjCount.dta"

*Model 1
eststo: nbreg project_count_bilat_f treated tp 
*Model 2
eststo: nbreg project_count_bilat_f treated tp committed_bilat_sec_yr committed_WB_sec_yr 
*Model 3
eststo: nbreg project_count_bilat_f treated tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum*  pcd_dum* 
*Model 4
eststo: nbreg project_count_bilat_f treated tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum*  pcd_dum* if noWB9==1 | treated==1
*generate raw table
esttab using DDifProjCount.tex, label   se  title(Diff-in-Diff: Number of Bilateral Projects\label{Res:DDif}) replace
eststo clear



*** Table 2B: Dirichlet Regression

clear
* cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
*load data for models 1 and 2
use "Models_SecAloc_1-2.dta"

*model 1
eststo diri1: qui dirifit f_sec_share_bilat_11 -f_sec_share_bilat_74  ,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_bilat_11 m3_sec_share_WB_f_11) alpha2(sec_share_bilat_12 m3_sec_share_WB_f_12) alpha3(sec_share_bilat_13 m3_sec_share_WB_f_13) alpha4(sec_share_bilat_14 m3_sec_share_WB_f_14) alpha5(sec_share_bilat_15 m3_sec_share_WB_f_15) alpha6(sec_share_bilat_16 m3_sec_share_WB_f_16) alpha7(sec_share_bilat_21 m3_sec_share_WB_f_21 ) alpha8(sec_share_bilat_22 m3_sec_share_WB_f_22) alpha9(sec_share_bilat_23 m3_sec_share_WB_f_23) alpha10(sec_share_bilat_24 m3_sec_share_WB_f_24) alpha11(sec_share_bilat_25 m3_sec_share_WB_f_25) alpha12(sec_share_bilat_31 m3_sec_share_WB_f_31) alpha13(sec_share_bilat_32 m3_sec_share_WB_f_32) alpha14(sec_share_bilat_33 m3_sec_share_WB_f_33) alpha15(sec_share_bilat_41 m3_sec_share_WB_f_41) alpha16(sec_share_bilat_42 m3_sec_share_WB_f_42 ) alpha17(sec_share_bilat_43 m3_sec_share_WB_f_43) alpha18(sec_share_bilat_51 m3_sec_share_WB_f_51) alpha19(sec_share_bilat_52 m3_sec_share_WB_f_52) alpha20(sec_share_bilat_53 m3_sec_share_WB_f_53) alpha21(sec_share_bilat_70 m3_sec_share_WB_f_70) alpha22(sec_share_bilat_72 m3_sec_share_WB_f_72) alpha23(sec_share_bilat_73 m3_sec_share_WB_f_73) alpha24(sec_share_bilat_74 m3_sec_share_WB_f_74) robust cluster(r_ccode) 
*model 2
eststo diri2: qui 	dirifit f_sec_share_bilat_11 - f_sec_share_bilat_74  ,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_bilat_11 m3_sec_share_WB_f_11 edu_ptrat_pri_WDI) alpha2(sec_share_bilat_12 m3_sec_share_WB_f_12 mr_infant_WDI) alpha3(sec_share_bilat_13 m3_sec_share_WB_f_13 lifexp_f_WDI ) alpha4(sec_share_bilat_14 m3_sec_share_WB_f_14 util_wat_FAO ) alpha5(sec_share_bilat_15 m3_sec_share_WB_f_15 fh_pr_QOG ) alpha6(sec_share_bilat_16 m3_sec_share_WB_f_16 gxp_gdp_WDI) alpha7(sec_share_bilat_21 m3_sec_share_WB_f_21) alpha8(sec_share_bilat_22 m3_sec_share_WB_f_22 telephones_WDI) alpha9(sec_share_bilat_23 m3_sec_share_WB_f_23 electr_WDI) alpha10(sec_share_bilat_24 m3_sec_share_WB_f_24 hf_financ ) alpha11(sec_share_bilat_25 m3_sec_share_WB_f_25 fi_reg_QOG) alpha12(sec_share_bilat_31 m3_sec_share_WB_f_31 va_agr_gdp_WDI ) alpha13(sec_share_bilat_32 m3_sec_share_WB_f_32 min_gdp_WDI) alpha14(sec_share_bilat_33 m3_sec_share_WB_f_33 trade_WDI) alpha15(sec_share_bilat_41 m3_sec_share_WB_f_41 elecrenew_WDI ) alpha16(sec_share_bilat_42 m3_sec_share_WB_f_42 lfpr_f_ilo_WDI ) alpha17(sec_share_bilat_43 m3_sec_share_WB_f_43) alpha18(sec_share_bilat_51 m3_sec_share_WB_f_51) alpha19(sec_share_bilat_52 m3_sec_share_WB_f_52 food_pvol_FAO) alpha20(sec_share_bilat_53 m3_sec_share_WB_f_53) alpha21(sec_share_bilat_70 m3_sec_share_WB_f_70 lndis_n_EMDAT ) alpha22(sec_share_bilat_72 m3_sec_share_WB_f_72 civwar_UCDP) alpha23(sec_share_bilat_73 m3_sec_share_WB_f_73 actotal_MEPV) alpha24(sec_share_bilat_74 m3_sec_share_WB_f_74 lndis_N5) robust cluster(r_ccode)    

*load data or models 3 and 4
clear
use "Models_SecAloc_3-4.dta"

*model 3
eststo diri3: qui dirifit f_sec_share_WB_11 - f_sec_share_WB_74  ,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_WB_11 m3_sec_share_bilat_f_11) alpha2(sec_share_WB_12 m3_sec_share_bilat_f_12) alpha3(sec_share_WB_13 m3_sec_share_bilat_f_13) alpha4(sec_share_WB_14 m3_sec_share_bilat_f_14) alpha5(sec_share_WB_15 m3_sec_share_bilat_f_15) alpha6(sec_share_WB_16 m3_sec_share_bilat_f_16) alpha7(sec_share_WB_21 m3_sec_share_bilat_f_21 ) alpha8(sec_share_WB_22 m3_sec_share_bilat_f_22) alpha9(sec_share_WB_23 m3_sec_share_bilat_f_23) alpha10(sec_share_WB_24 m3_sec_share_bilat_f_24) alpha11(sec_share_WB_25 m3_sec_share_bilat_f_25) alpha12(sec_share_WB_31 m3_sec_share_bilat_f_31) alpha13(sec_share_WB_32 m3_sec_share_bilat_f_32) alpha14(sec_share_WB_33 m3_sec_share_bilat_f_33) alpha15(sec_share_WB_41 m3_sec_share_bilat_f_41) alpha16(sec_share_WB_42 m3_sec_share_bilat_f_42 ) alpha17(sec_share_WB_43 m3_sec_share_bilat_f_43) alpha18(sec_share_WB_51 m3_sec_share_bilat_f_51) alpha19(sec_share_WB_52 m3_sec_share_bilat_f_52) alpha20(sec_share_WB_53 m3_sec_share_bilat_f_53) alpha21(sec_share_WB_70 m3_sec_share_bilat_f_70) alpha22(sec_share_WB_72 m3_sec_share_bilat_f_72) alpha23(sec_share_WB_73 m3_sec_share_bilat_f_73) alpha24(sec_share_WB_74 m3_sec_share_bilat_f_74) robust cluster(r_ccode)  
*model 4
eststo diri4: qui 	dirifit f_sec_share_WB_11 - f_sec_share_WB_74,  alphavar(ln_pop ln_gdp l_committed_bilat_yr l_WB_rec_yr) alpha1(sec_share_WB_11 m3_sec_share_bilat_f_11 edu_ptrat_pri_WDI ) alpha2(sec_share_WB_12 m3_sec_share_bilat_f_12 mr_infant_WDI ) alpha3(sec_share_WB_13 m3_sec_share_bilat_f_13 lifexp_f_WDI ) alpha4(sec_share_WB_14 m3_sec_share_bilat_f_14 util_wat_FAO ) alpha5(sec_share_WB_15 m3_sec_share_bilat_f_15 fh_pr_QOG ) alpha6(sec_share_WB_16 m3_sec_share_bilat_f_16 gxp_gdp_WDI) alpha7(sec_share_WB_21 m3_sec_share_bilat_f_21) alpha8(sec_share_WB_22 m3_sec_share_bilat_f_22 telephones_WDI ) alpha9(sec_share_WB_23 m3_sec_share_bilat_f_23 electr_WDI ) alpha10(sec_share_WB_24 m3_sec_share_bilat_f_24 hf_financ ) alpha11(sec_share_WB_25 m3_sec_share_bilat_f_25 fi_reg_QOG ) alpha12(sec_share_WB_31 m3_sec_share_bilat_f_31 va_agr_gdp_WDI) alpha13(sec_share_WB_32 m3_sec_share_bilat_f_32 min_gdp_WDI) alpha14(sec_share_WB_33 m3_sec_share_bilat_f_33 trade_WDI) alpha15(sec_share_WB_41 m3_sec_share_bilat_f_41 elecrenew_WDI ) alpha16(sec_share_WB_42 m3_sec_share_bilat_f_42 lfpr_f_ilo_WDI ) alpha17(sec_share_WB_43 m3_sec_share_bilat_f_43) alpha18(sec_share_WB_51 m3_sec_share_bilat_f_51) alpha19(sec_share_WB_52 m3_sec_share_bilat_f_52 food_pvol_FAO  ) alpha20(sec_share_WB_53 m3_sec_share_bilat_f_53) alpha21(sec_share_WB_70 m3_sec_share_bilat_f_70 lndis_n_EMDAT) alpha22(sec_share_WB_72 m3_sec_share_bilat_f_72 civwar_UCDP) alpha23(sec_share_WB_73 m3_sec_share_bilat_f_73 actotal_MEPV) alpha24(sec_share_WB_74 m3_sec_share_bilat_f_74 lndis_N5) robust cluster(r_ccode)

*generate raw table
esttab diri1 diri2 diri3 diri4 using TableB2.rtf, label starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) rtf replace
****


*** Table B3: Project counts with sector control variables
clear
*cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use"Models_ProjCount.dta"

eststo s1: qui nbreg  project_count_bilat_f i.noWB9 edu_ptrat edu_dur committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum1==1 & (WB9comp==1 | noWB9==1)
eststo s2: qui nbreg project_count_bilat_f i.noWB9 mr_infant mr_f hxp_oop committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum2==1 & (WB9comp==1 | noWB9==1)
eststo s3: qui nbreg project_count_bilat_f i.noWB9 lifexp_f une_tfr pop_65nn pop_0014  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum3==1 & (WB9comp==1 | noWB9==1)
eststo s4: qui nbreg project_count_bilat_f i.noWB9 util_wat util_san  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum4==1 & (WB9comp==1 | noWB9==1)
eststo s5: qui nbreg project_count_bilat_f i.noWB9 fh_pr fh_cl  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum5==1 & (WB9comp==1 | noWB9==1)
eststo s6: qui nbreg project_count_bilat_f i.noWB9 gxp_gdp  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum6==1 & (WB9comp==1 | noWB9==1)
eststo s7: qui nbreg project_count_bilat_f i.noWB9 lnair lnrail  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum7==1 & (WB9comp==1 | noWB9==1)
eststo s8: qui nbreg project_count_bilat_f i.noWB9 servers_WDI telephones_WDI  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum8==1 & (WB9comp==1 | noWB9==1)
eststo s9: qui nbreg project_count_bilat_f i.noWB9 electr_WDI eneruse elec_imp elecrenew fuel_exp committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum9==1 & (WB9comp==1 | noWB9==1)
eststo s10: qui nbreg project_count_bilat_f i.noWB9 hf_financ kaopen_n_CI  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum10==1 & (WB9comp==1 | noWB9==1)
eststo s11: qui nbreg project_count_bilat_f i.noWB9 fi_reg irq  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum11==1 & (WB9comp==1 | noWB9==1)
eststo s12: qui nbreg project_count_bilat_f i.noWB9 va_agr emp_agr food_price committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum12==1 & (WB9comp==1 | noWB9==1)
eststo s13: qui nbreg project_count_bilat_f i.noWB9 min_gdp committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum13==1 & (WB9comp==1 | noWB9==1)
eststo s14: qui nbreg project_count_bilat_f i.noWB9 trade_WDI committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum14==1 & (WB9comp==1 | noWB9==1)
eststo s15: qui nbreg project_count_bilat_f i.noWB9 pop_density co2_pc co2_PPP  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum15==1 & (WB9comp==1 | noWB9==1)
eststo s16: qui nbreg project_count_bilat_f i.noWB9 lfpr_f_ilo_WDI vdem_gender_QOG wiparl_WDI  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum16==1 & (WB9comp==1 | noWB9==1)
eststo s17: qui nbreg project_count_bilat_f i.noWB9 food_pvol food_prev food_depth  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum19==1 & (WB9comp==1 | noWB9==1)
eststo s18: qui nbreg project_count_bilat_f i.noWB9 tmg_rpch  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum20==1 & (WB9comp==1 | noWB9==1) 
eststo s19: qui nbreg project_count_bilat_f i.noWB9 lndis_n lndis_aff  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum21==1 & (WB9comp==1 | noWB9==1)
eststo s20: qui nbreg project_count_bilat_f i.noWB9 civwar bd_WDI  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum22==1 & (WB9comp==1 | noWB9==1)
eststo s21: qui nbreg project_count_bilat_f i.noWB9 actotal_MEPV  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum23==1 & (WB9comp==1 | noWB9==1)
eststo s22: qui nbreg project_count_bilat_f i.noWB9 lndis_N5  committed_bilat_sec_yr committed_WB_sec_yr ln_pop gdppc yr_dum* if pcd_dum24==1 & (WB9comp==1 | noWB9==1)
	
esttab s1 s2 s3 s4 s5 s6 s7 s8, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop(0* *dum* _*)
esttab s9 s10 s11 s12 s13 s14 s15 s16, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop(0* *dum* _*)
esttab s17 s18 s19 s20 s21 s22, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop(0* *dum* _*)



*** Table B4: Diff-in-diff of project counts with sector control variables

clear
*cd "LOCATION OF FILES"
cd "/Users/martin/Dropbox/Documents/ProjectMultilateralAid/Data/Rework2021/ReplicationWBER/"
use"Models_ProjCount.dta"

eststo dc1:  nbreg project_count_bilat_f treated  edu_ptrat edu_dur  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum10==1 & (noWB9==1 | treated==1)
eststo dc2:  nbreg project_count_bilat_f treated mr_infant mr_f hxp_oop  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum1==1 & (noWB9==1 | treated==1)
eststo dc3:  nbreg project_count_bilat_f treated lifexp_f une_tfr pop_65nn pop_0014   tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum2==1 & (noWB9==1 | treated==1)
eststo dc4:  nbreg project_count_bilat_f treated util_wat util_san  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum3==1 & (noWB9==1 | treated==1)
eststo dc5:  nbreg project_count_bilat_f treated fh_pr fh_cl  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum4==1 & (noWB9==1 | treated==1)
eststo dc6:  nbreg project_count_bilat_f treated gxp_gdp  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum5==1 & (noWB9==1 | treated==1)
eststo dc7:  nbreg project_count_bilat_f treated lnair lnrail  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum6==1 & (noWB9==1 | treated==1)
eststo dc8:  nbreg project_count_bilat_f treated servers_WDI telephones_WDI  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum7==1 & (noWB9==1 | treated==1)
eststo dc9:  nbreg project_count_bilat_f treated electr_WDI eneruse elec_imp elecrenew fuel_exp tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum8==1 & (noWB9==1 | treated==1)
eststo dc10:  nbreg project_count_bilat_f treated hf_financ kaopen_n_CI tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum9==1 & (noWB9==1 | treated==1)		
eststo dc11:  nbreg project_count_bilat_f treated fi_reg irq tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum11==1 & (noWB9==1 | treated==1)
eststo dc12:  nbreg project_count_bilat_f treated va_agr emp_agr food_price tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum12==1 & (noWB9==1 | treated==1)
eststo dc13:  nbreg project_count_bilat_f treated min_gdp tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum13==1 & (noWB9==1 | treated==1)
eststo dc14:  nbreg project_count_bilat_f treated trade_WDI  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum14==1 & (noWB9==1 | treated==1)
eststo dc15:  nbreg project_count_bilat_f treated pop_density co2_pc co2_PPP  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum15==1 & (noWB9==1 | treated==1)
eststo dc16:  nbreg project_count_bilat_f treated lfpr_f_ilo_WDI vdem_gender_QOG wiparl_WDI  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum16==1 & (noWB9==1 | treated==1)
eststo dc17:  nbreg project_count_bilat_f treated food_pvol food_prev food_depth  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum19==1 & (noWB9==1 | treated==1)
eststo dc18:  nbreg project_count_bilat_f treated civwar bd_WDI   tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum22==1 & (noWB9==1 | treated==1)
eststo dc19:  nbreg project_count_bilat_f treated actotal_MEPV  tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum23==1 & (noWB9==1 | treated==1)
eststo dc20:  nbreg project_count_bilat_f treated lndis_N5   tp committed_bilat_sec_yr committed_WB_sec_yr ln_pop  gdppc yr_dum* if pcd_dum24==1 & (noWB9==1 | treated==1)

esttab dc1 dc2 dc3 dc4 dc5 dc6 dc7 dc8, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop( *dum* _*) order(tp)
esttab dc9 dc10 dc11 dc12 dc13 dc14 dc15 dc16, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop( *dum* _*) order(tp)
esttab dc17 dc18 dc19 dc20, starlevels(* .05 ** .01 *** .001) cells(b(star fmt(3)) se(par fmt(3))) drop( *dum* _*) order(tp)



